//headers.h
#include<iostream>
#include<cstdlib>
#include<ctime>
#include<fstream>
#include<vector>
#include<time.h>
#include<algorithm>
#include<math.h>
#include"node.h"

using namespace std;

//genetic parameters
#define POPULATION_SIZE 250//size of initial population
#define NUMBER_OF_GENERATIONS 100
#define MUTATION_RATE 30//number of candidates mutated per 100
#define GROUP_SIZE 100//number of candidates selected after each generation

#define ADDITIONAL_FEET 16

vector < vector<Node> > gAllNetworks; //contains all the networks
vector < Node > gNetwork; // contains the current network under consideration
vector < vector <int> > gCurrentGeneration;
vector < int > gSolution;//best solution till now
int gCurrentNetworkNumber = 0;

void getData();     //loads the input into allnetworks
void geneticAlgorithm();
void populate();// randomly creates a world of candidates
bool myDataSortPredicate(vector<int> , vector<int> );
void selection();
void mutation();
double fitness( vector<int> );
void printSolution( vector<int> );
